From bcf03c499ef235cc6b5a51735c59818253c5f76d Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Wed, 27 Jan 2021 21:26:51 +0100 Subject: [PATCH] [PATCH] restore setting unroll-threshold on LLVM 9 otherwise kernel/test_rotate hangs on avx512 capable cpus (this partially reverts 459d0bb5241a62af3b5b607a65dcf5e9a34a01ee) Gbp-Pq: Name 2003-restore-setting-unroll-threshold-on-LLVM-9.patch --- lib/CL/pocl_llvm_utils.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/CL/pocl_llvm_utils.cc b/lib/CL/pocl_llvm_utils.cc index aa0d33d..7ff6645 100644 --- a/lib/CL/pocl_llvm_utils.cc +++ b/lib/CL/pocl_llvm_utils.cc @@ -347,6 +347,12 @@ void InitializeLLVM() { O->addOccurrence(1, StringRef("debug"), StringRef("true"), false); } +#if LLVM_MAJOR == 9 + O = opts["unroll-threshold"]; + assert(O && "could not find LLVM option 'unroll-threshold'"); + O->addOccurrence(1, StringRef("unroll-threshold"), StringRef("1"), false); +#endif + LLVMInitialized = true; } -- 2.30.2